package com.ssii.www.myproject.domain;

import lombok.Data;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name="t_role")
@Data
public class Role  extends BaseDomain {

  private String sn;

  private String name;

  @ManyToMany
  @JoinTable(name="t_role_permission",joinColumns = @JoinColumn(name="role_id"),inverseJoinColumns = @JoinColumn(name="permission_id"))
  private List<Permission> permissions = new ArrayList<>();
}
